/**
 *
 */
package hb.software.role.category;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import edu.zut.hb.software.base.domain.BaseTreeEntity;
import hb.software.role.entity.Role;

/**
 * @author Mie
 *
 */
@Entity
@Table(name="T_RoleCategory")
@NamedQueries({ @NamedQuery(name = "RoleCategory.getRoot", query = "select g from RoleCategory g where g.parent is null") })
public class RoleCategory extends BaseTreeEntity<RoleCategory, Long>{
	/**
	 *
	 */
	private static final long serialVersionUID = 7137087384176395645L;
	@Column
	String roleName;
	@OneToMany
	List<Role> roles;
	public String getRoleName() {
		return roleName;
	}
	public void setRoleName(String roleName) {
		this.roleName = roleName;
	}

	public List<Role> getRoles() {
		return roles;
	}

	public void setRoles(List<Role> roles) {
		this.roles = roles;
	}
}
